home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWViews / FWAClust.cpp < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.8 KB  |  79 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWAClust.cpp
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9. // We separate the archiving functions into their own translation units in order to
  10. // enable dead-stripping.
  11.  
  12. #include "FWFrameW.hpp"
  13.  
  14. #ifndef FWCLUSTR_H
  15. #include "FWClustr.h"
  16. #endif
  17.  
  18. //========================================================================================
  19. // File scope definitions
  20. //========================================================================================
  21.  
  22. #ifdef FW_BUILD_MAC
  23. #pragma segment fwgadgts
  24. #endif
  25.  
  26. //========================================================================================
  27. //    CLASS FW_CRadioCluster
  28. //========================================================================================
  29.  
  30. const FW_ClassTypeConstant FW_LRadioCluster = FW_TYPE_CONSTANT('r','c','l','s');
  31. FW_REGISTER_ARCHIVABLE_CLASS(FW_LRadioCluster, FW_CRadioCluster, FW_CRadioCluster::Create, 
  32.                             FW_CRadioCluster::Read, FW_CRadioCluster::Destroy, FW_CRadioCluster::Write)
  33.  
  34. //----------------------------------------------------------------------------------------
  35. //    FW_CRadioCluster::Create
  36. //----------------------------------------------------------------------------------------
  37.  
  38. void* FW_CRadioCluster::Create(FW_CReadableStream& stream, FW_ClassTypeConstant type)
  39. {
  40. FW_UNUSED(stream);
  41. FW_UNUSED(type);
  42.     FW_SOMEnvironment ev;
  43.     return FW_NEW(FW_CRadioCluster, (ev));
  44. }
  45.  
  46. //----------------------------------------------------------------------------------------
  47. //    FW_CRadioCluster::Read
  48. //----------------------------------------------------------------------------------------
  49.  
  50. void FW_CRadioCluster::Read(FW_CReadableStream& stream, FW_ClassTypeConstant type, void* object)
  51. {
  52. FW_UNUSED(type);
  53.     FW_SOMEnvironment ev;
  54.     ((FW_CRadioCluster *) object)->InitializeFromStream(ev, stream);
  55. }
  56.  
  57. //----------------------------------------------------------------------------------------
  58. //    FW_CRadioCluster::Write
  59. //----------------------------------------------------------------------------------------
  60.  
  61. void FW_CRadioCluster::Write(FW_CWritableStream& stream, FW_ClassTypeConstant type, const void *object)
  62. {
  63. FW_UNUSED(type);
  64.     FW_SOMEnvironment ev;
  65.     ((const FW_CRadioCluster *) object)->Flatten(ev, stream);
  66. }
  67.  
  68. //----------------------------------------------------------------------------------------
  69. //    FW_CRadioCluster::Destroy
  70. //----------------------------------------------------------------------------------------
  71.  
  72. void FW_CRadioCluster::Destroy(void* object, FW_ClassTypeConstant type)
  73. {
  74. FW_UNUSED(type);
  75.     FW_CRadioCluster* self = (FW_CRadioCluster*) object;
  76.     delete self;
  77. }
  78.  
  79.